'use strict'
const merge = require('webpack-merge')
const prodEnv = require('./prod.env')

let params = process.argv[4]
let baseUrl = ''
let corpid = ''
switch (params) {
  case '--env=test':
    baseUrl = '"http://dengta-test.api.jgyljt.com"'
    corpid = '"dingf23237b108a1780935c2f4657eb6378f"'
    break
  case '--env=prod':
    baseUrl = '"https://beacon.api.jgyljt.com"'
    corpid = '"dingf23237b108a1780935c2f4657eb6378f"'
    break
  default:
    baseUrl = '"http://dengta-test.api.jgyljt.com"'
    corpid = '"dingf23237b108a1780935c2f4657eb6378f"'
}
module.exports = merge(prodEnv, {
  NODE_ENV: '"development"',
  CORP_ID: corpid,
  VUE_APP_API: baseUrl,
  API_HOST: '"/baas/"'
})
